<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			.c{
				font-size: 56px;
				color:red;
				border: 2px solid greenyellow;
				width: 60%;
				text-align: center;
			}
		</style>
		<script>
			function changeFont(){
				let t1=document.getElementById("t1");
				t1.style.fontSize="50px";
				t1.style.fontWeight=100;
				///t1.CSSText="color:red;border:2px solid red;";
			}
			function changeFont2(){
				let t1=document.getElementById("t1");
				//t1.className="c";
				t1.classList.add("c");
			}
		</script>
	</head>
	<body>
		<h1 id="t1">教育改变生活</h1>
		<div>
			<input type="button" value="改变文字" onclick="changeFont()" />
			<input type="button" value="改变文字2" onclick="changeFont2()" />
		</div>
	</body>
</html>